export interface MsgInfo {
	type: string;
	content: string;
	//{"email":'内容'}
	//{"sms":'内容'}
}
export const useMessage = () => {
	/**
	 * content=`[{{"sms":'内容'}}]`
	 * @param content content
	 * @returns
	 */
	const getMsgContent = (content: string): MsgInfo => {
		if (!content) {
			return { type: "", content: "" };
		} else {
			let row = JSON.parse(content)[0];
			let info = Object.entries(row)[0];
			return {
				type: info[0] || "",
				content: info[1] + ""
			};
		}
	};
	return { getMsgContent };
};
